<script src="Libraries/js/js.js"></script>
<?php
	include_once('Models/HocPhan.php');
	//include_once('Models/NguoiDung.php');
	include_once('Configs/paging.php');
?>
<form name="xemnhatki" method="POST">
<table align="center" class="font" width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class=main_1><img border="0" src="Libraries/images/tbl_left.gif" width="10" height="25" /></td>
    <td align=center class=main_1>Xem Nhật Kí Giảng Dạy Lớp Học Phần </td>
    <td class=main_1><p align="right"><img border="0" src="Libraries/images/tbl_right.gif" width="10" height="25" /></p></td>
  </tr>
  <tr bgcolor="#dae9f3">
    <td class="border_1" colspan="3" valign="top">
        
            <table border="0" align="center" width="100%">
                <tr>
                    <td colspan="4" >&nbsp;</td>
                </tr>
                <tr>
                  <td align="right" >Khoa   				  </td>
                  <td colspan="3" align="left" ><?php 
                    $nd = new NguoiDung();
                    $nd->setMaSo($_SESSION['maso']);
                    $nd->setMaQuyen($_SESSION['maquyen']); 
                                
                    $result = $nd->hienThiKhoaTheoMaQuyen();
                    
                  ?>
                    <select name="cbokhoa" onchange="showBMTheoKhoaQuyen(this.value);">
                      <option value=" "></option>
                      <?php
								
                                
                                while ($rows=mysql_fetch_array($result)){
                                    echo "<option value='".$rows['makhoa']."'";
				
				                    echo ">".$rows['tenkhoa']."</option>";
                                }
                                echo "<script language=\"javascript\">for(var i=0;i<document.xemnhatki.cbokhoa.length;i++){if(document.xemnhatki.cbokhoa[i].value=='$mahp'){document.xemnhatki.cbokhoa.selectedIndex=i;break;}}</script>";
			
                            ?>
                    </select></td>
                </tr>
                <tr>
                  <td align="right" >Bộ môn</td>
                  <td colspan="3" align="left" ><div id="bomon"><select name="cbobomon">
                    <option value=" ">Danh sách bộ môn</option>
                  </select></div></td>
                </tr>
                <tr>
                    <td width="80" align=right><label>Năm học</label></td>
                    <td>
                        <select name="cbonamhoc" >
                            <?php
								$nam = 2000;
								for($i=0;$i<10;$i++){
									$nk=($nam+$i)."-".($nam+$i+1);
                                    echo "<option value='".$nk."'>$nk</option>";
                                }
								echo "<script language=\"javascript\">for(var i=0;i<document.capnhatlophp.cbonienkhoa.length;i++){if(document.capnhatlophp.cbonienkhoa[i].value=='$nienkhoa'){document.capnhatlophp.cbonienkhoa.selectedIndex=i;break;}}</script>";
                                ?>
                        </select>                    </td>
                    <td width="60" align="right">Học kì</td>
                    <td><select name="cbohocki" onchange="showHocPhan(document.capnhatlophp.cbonamhoc.value,this.value);">
                      <option value="1" selected="selected" <?php if ($_POST['cbohocki']==1) echo "selected='selected'"; ?>>Học kì I</option>
                      ;
                            
                      <option value="2" <?php if ($_POST['cbohocki']==2) echo "selected='selected'"; ?>>Học kì II</option>
                      ;
							
                      <option value="3" <?php if ($_POST['cbohocki']==3) echo "selected='selected'"; ?>>Học kì hè</option>
                      ;      
                        
                    </select></td>
                </tr>
				<tr>
          	        <td align=right><label>Học phần </label></td>
                    <td align=left><select name="cbohp">
                      <?php
								$hp = new HocPhan();
                                $result = $hp->dsTatCaHP();
                                while ($rows=mysql_fetch_array($result)){
                                    echo "<option value='".$rows['mahp']."'";				
				                    echo ">".$rows['tenhp']."</option>";
                                }
                                echo "<script language=\"javascript\">for(var i=0;i<document.capnhatlophp.cbohp.length;i++){if(document.capnhatlophp.cbohp[i].value=='$mahp'){document.capnhatlophp.cbohp.selectedIndex=i;break;}}</script>";
			
                            ?>
                    </select></td>
                    <td align=right>Lớp HP</td>
                    <td align=left>
						<select name="cbolophp">
                    	</select>					</td>
				</tr>
                <tr>
           	      <td align=center colspan="4">
				    <input type="submit" name="btnxem" value="Xem" class="button_1"/></td>
                </tr>
            </table>
       
           

    </td>
  </tr>
</table>

</form>

